home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / maestro / source / videbjct / necdrivr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-15  |  5.5 KB  |  161 lines

  1. /*
  2.  * Copyright (c) 1990, 1991, 1992 Stanford University
  3.  *
  4.  * Permission to use, copy, modify, and distribute this software and 
  5.  * its documentation for any purpose is hereby granted without fee, provided
  6.  * that (i) the above copyright notices and this permission notice appear in
  7.  * all copies of the software and related documentation, and (ii) the name
  8.  * Stanford may not be used in any advertising or publicity relating to
  9.  * the software without the specific, prior written permission of
  10.  * Stanford.
  11.  * 
  12.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  13.  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  14.  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  15.  *
  16.  * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
  17.  * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
  18.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT
  19.  * ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY,
  20.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21.  * SOFTWARE.
  22.  */
  23.  
  24. /* $Header: /Source/Media/collab/VideoObject/RCS/NECDriver.h,v 0.19 92/09/01 17:07:55 drapeau Exp $ */
  25. /* $Log:    NECDriver.h,v $
  26.  * Revision 0.19  92/09/01  17:07:55  drapeau
  27.  * Added function prototypes for better ANSI compliance.
  28.  * Updated copyright notice.
  29.  * Added definitions for two new methods, NECRecord() and NECRecordFromTo().
  30.  * 
  31.  * Revision 0.18  92/07/30  15:20:31  drapeau
  32.  * Removed XView-specific code (header files, in this case).
  33.  * 
  34.  * Revision 0.17  92/01/03  16:49:55  drapeau
  35.  * Removed inclusion of string.h so no conflicts occur with other files that
  36.  * use this driver.
  37.  * 
  38.  * Revision 0.16  91/09/30  17:05:22  lim
  39.  * Added NECPing.
  40.  * 
  41.  * Revision 0.15  91/09/03  16:03:36  lim
  42.  * Red redefined as ScreenRed.
  43.  * 
  44.  * Revision 0.11  91/08/25  16:21:50  lim
  45.  * Included diagMode and PrintDiagnostics().
  46.  * 
  47.  * Revision 0.14  91/08/24  13:37:57  lim
  48.  * 1. Updated to use status codes in new PlayerStatus.h
  49.  * 2. Clear Marker() removed as part of video object.
  50.  * 
  51.  * Revision 0.13  91/08/17  20:44:45  lim
  52.  * NECInterrupt becomes NECClearMarker.
  53.  * 
  54.  * Revision 0.12  91/08/08  16:22:23  lim
  55.  * 1. New include files, so that can compile separately, away from vcrEdit app.
  56.  * 2. Added NECClient (= 200)
  57.  * 3. Changed Error to -100
  58.  * 4. Removed NECPause() and included NECStill() instead.
  59.  * 5. Added NECSetAddressingMode().
  60.  * 
  61.  * Revision 0.11  91/07/20  11:40:57  lim
  62.  * Added new function, NECCalcSpeed().
  63.  * 
  64.  * Revision 0.10  91/07/16  16:13:31  lim
  65.  * Initial revision.
  66.  *  */
  67.  
  68. #include <ctype.h>
  69. #include <fcntl.h>
  70. #include <stdio.h>
  71. #include <sys/termio.h>
  72. #include <sys/time.h>
  73. #include <sys/resource.h>
  74.  
  75. #ifndef _WaitHeader_
  76. #define _WaitHeader_
  77. #include <sys/wait.h>
  78. #endif
  79.  
  80. #include "videoObj.h"
  81. #include "PlayerStatus.h"
  82.  
  83. /*  Defines that need to be included  */
  84.  
  85. #define NECClient                    200
  86.  
  87. /* Status codes */
  88. #define NECHiSpeedSearch             1000
  89. #define NECPictureSearch             1001
  90. #define NECRPictureSearch            1002
  91. #define NECRHiSpeedSearch            1003
  92. #define NECForwardIndexScanSearch    1004
  93. #define NECIndexScan                 1005
  94. #define NECReverseIndexScanSearch    1006
  95. #define NECSlow1_30                  1007
  96. #define NECSlow1_10                  1008
  97. #define NECSlow1_5                   1009
  98. #define NECInsertPause               1010
  99. #define NECInsertPlay                1011
  100. #define NECAudioDubPause             1012
  101. #define NECAudioDubPlay              1013
  102. #define NECAudioInsertPause          1014
  103. #define NECAudioInsertPlay           1015
  104.  
  105. /* Screen colors */
  106.  
  107. #define Magenta                      1
  108. #define Blue                         2
  109. #define Green                        3
  110. #define Yellow                       4
  111. #define ScreenRed                    5
  112. #define Violet                       6
  113. #define Cyan                         7
  114. #define YellowGreen                  8
  115.  
  116. #define BrightnessNormal             0
  117. #define BrightnessDim                1
  118. #define BrightnessLow                2
  119.  
  120. /* Error codes */
  121.  
  122. #define Error                        -100
  123. #define ErrPowerOff                   0
  124. #define ErrCantReadAdd                1
  125. #define ErrNoCassette                 2
  126. #define ErrIncorrectCommand           4
  127. #define ErrIncorrectParameter         5
  128. #define ErrReceptionBuffOverflow      6
  129. #define ErrCantReadHeader             8 
  130. #define ErrCantExecCommand            9
  131.  
  132. static char vcrhrcsid[]="$Header: /Source/Media/collab/VideoObject/RCS/NECDriver.h,v 0.19 92/09/01 17:07:55 drapeau Exp $";
  133.  
  134.  
  135. int NECPlay            (VideoObject*);
  136. int NECPlayFromTo        (VideoObject*, int, int, int);
  137. int NECFastForward        (VideoObject*);
  138. int NECReverse            (VideoObject*);
  139. int NECCalcSpeed        (VideoObject*, int, int);
  140. int NECPlayAtSpeedDir        (VideoObject*, int, enum Direction);
  141. int NECStep            (VideoObject*, enum Direction);
  142. int NECStill            (VideoObject*);
  143. int NECStop            (VideoObject*);
  144. int NECSetDefaults        (VideoObject*, int, int, int, int);
  145. int NECSetAudio            (VideoObject*, int);
  146. int NECSetVideo            (VideoObject*, int);
  147. int NECSetAddressingMode    (VideoObject*, int);
  148. int NECEject            (VideoObject*);
  149. int NECPower            (VideoObject*, int);
  150. int NECQueryFrame        (VideoObject*);
  151. int NECQueryChapter        (VideoObject*);
  152. int NECQueryAudio        (VideoObject*);
  153. int NECQueryVideo        (VideoObject*);
  154. int NECReadHeader        (VideoObject*, char*);
  155. int NECQueryStatus        (VideoObject*);
  156. int NECPing            (VideoObject*);
  157. int NECRecord            (VideoObject*);
  158. int NECRecordFromTo        (VideoObject*, int, int, int);
  159. void NECErrorDecode        (VideoObject*, int, char*);
  160.  
  161.